import asyncio
from pyppeteer import launch
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QFileDialog
from PyQt5 import QtGui

# def openimage(self):
    # imgName, imgType = QFileDialog.getOpenFileName(self, "打开图片", "", "*.jpg;;*.png;;All Files(*)")
    # jpg = QtGui.QPixmap(imgName).scaled(self.label.width(), self.label.height())
    # self.label.setPixmap(jpg)


app = QApplication(sys.argv)
window = QWidget()
window.resize(650, 650)  # 窗口尺寸
window.move(650, 300) # 窗口坐标
window.setWindowTitle('销量排行')
window.show()






async def main():
    browser = await launch({'headless': False, 'args': ['--no-sandbox'], })
    page = await browser.newPage()
    await page.goto('https://www.baidu.com/')



    await page.close()
    await browser.close()

asyncio.get_event_loop().run_until_complete(main())

sys.exit(app.exec_())

